#include "gameoverscreen.h"
#include "ui_gameoverscreen.h"

GameOverScreen::GameOverScreen(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::GameOverScreen)
{
    ui->setupUi(this);
}

GameOverScreen::GameOverScreen(ScoreKeeper *keeper):
    QWidget(0),
    ui(new Ui::GameOverScreen)
{
    ui->setupUi(this);
    ui->HomeRunsLabel->setText(QString::number((keeper->getHomeScore())));
    ui->awayRunsLabel->setText(QString::number((keeper->getAwayScore())));
    ui->homeHitsLabel->setText(QString::number((keeper->getHomeHits())));
    ui->awayHitsLabel->setText(QString::number((keeper->getAwayHits())));
}

GameOverScreen::~GameOverScreen()
{
    delete ui;
}

void GameOverScreen::done(){
    this->close();
}
